"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _react = require("react");
/**
 * 组件挂载时执行 fn
 * @param fn
 */
var useMount = function useMount(fn) {
  (0, _react.useEffect)(function () {
    return fn === null || fn === void 0 ? void 0 : fn();
  }, []);
};
var _default = useMount;
exports.default = _default;